package com.ruoyi.mapper;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.domain.HotelOrder;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

public interface OrderMapper {

    Map getHouseObjAndRpObj(Map map);

    int insertOrder(Map map);

    Map getOrderByOrderCode(String orderCode);

    Map getOrderByOrderId(String orderId);

    Map getOrderByeOrderCode(String eOrderCode);

    List<Map> getOrderList(Map map);

    int updateOrder(Map map);

    int insertCancelOrder(Map map);

    int insertCancelOrderRepeat(Map map);

    int updateCancelOrder(Map map);

    List<Map> getOrderByNoRemind(Long userId);

    int updateNoRemindOrderByUserId(Long userId);

    int updateNoRemindOrderCancelByUserId(Long userId);

    List<String> getAllUser();

    int insertRemind(@Param("orderCode") String orderCode,
                     @Param("userIds") List<String> userIds,
                     @Param("orderType") int orderType);

    int getOrderCancelCountByOrderId(String orderId);

    List<HotelOrder> getOrderListExport(Map map);

    // 插入订单采购价
    int insertOrderPrice(@Param("orderId") String orderId, @Param("orderCode") String orderCode, @Param("rpPriceData") List<Map> rpPriceData);

    // 查询订单采购价
    List<Map> getOrderPrice(String orderCode);

    // 修改订单采购价
    int postUpdateOrderPrice(Map map);

    // 插入特殊退款场景
    int insertOrderSpecial(JSONObject jsonObject);

    List<Map> quchongfu();

    List<String> quchongfuDandu(@Param("house_id") String house_id, @Param("house_day") String house_day);

    int schouse(String houseDayId);

    int scrp(String houseDayId);

    List<Map> getOrder();

    /**
     * 取超过20分钟还没有处理的订单
     *
     * @return
     */
    List<String> getOrdersUnprocessedOverTwentyMinutes();


}
